﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace NasuTek.Shion
{
    public partial class HelpWindow : Form
    {
        public HelpWindow()
        {
            InitializeComponent();
        }

        private void HelpWindow_Load(object sender, EventArgs e)
        {
            webBrowser1.Navigate("about:blank");
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Text == "Welcome") { webBrowser1.Document.Write(Help.HelpEngine.Welcome_to_Shion_6.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "IRC Tutorial") { webBrowser1.Document.Write(Help.HelpEngine.IRC_Tutorial.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "IRC Operators Guide") { webBrowser1.Document.Write(Help.HelpEngine.IRC_Operators_Guide.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "Connect to Server") { webBrowser1.Document.Write(Help.HelpEngine.Connect_to_Server.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "Join Channel") { webBrowser1.Document.Write(Help.HelpEngine.Join_Channel.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "Chat Privately") { webBrowser1.Document.Write(Help.HelpEngine.Chat_Privately.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "Lua Scripting") { webBrowser1.Document.Write(Help.HelpEngine.Lua_Scripting.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
            else if (e.Node.Text == "IRC Commands") { webBrowser1.Document.Write(Help.HelpEngine.IRC_Commands.Replace("{SHIONDIRECTORY}", Application.StartupPath)); webBrowser1.Refresh(); }
        }

        private void toolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
